package main

import (
	"log"
	"net"

	"gitee.com/xuender/pp"
	"gitee.com/xuender/pp/nets"
)

// nolint: gomnd, errcheck
func main() {
	u := nets.NewUDPService(&pp.Config{UDPPort: 3000})
	defer u.Close()

	log.Println("启动监听")
	u.Listen(func(addr *net.UDPAddr, bs []byte) {
		log.Println(addr, bs)
	})
}
